# -*- coding:utf-8 -*-
from config.setting_globle import SettingGloble
from framework.constant.Testing import Testing


# 数据库连接
class SettingTest(SettingGloble):
    ENVNAME = '测试环境'
    DEBUG_MODEL_SWITCH = False  # 服务debug模式只在dev环境开启
    # 数据库连接
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://用户:密码@host/库名"
    SQLALCHEMY_BINDS = {
        Testing.TEST_DB: "mysql+pymysql://用户:密码@host/库名",
    }
    SQLALCHEMY_ECHO = True
    SQLALCHEMY_ENGINE_OPTIONS = {
        'echo_pool': True,
        'pool_size': 50,
        'max_overflow': 100,
        'pool_recycle': 30
    }
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True

    XXLJOB_CALLBACK_URL = "http://xxl-job.airqualitychina.cn:9999/xxl-job-admin/api/callback"
